package cn.u313.comm.utils;

import cn.u313.comm.conststring.M163Txt;

public class TxtUtil {
    /**
     * 获取数组中随机一条数据
     * @param atgs
     * @return
     */
    public static String radomTxt(String []  atgs ){
        if(atgs==null||atgs.length==0)
            return "";
        return atgs[(int)(Math.random()*atgs.length)];
    }
    public static String radomTxtToF(String []  atgs,int n ){
        return String.format(radomTxt(atgs),new Integer[]{n});
    }
    public static boolean radombool(boolean []  atgs ){
        if(atgs==null||atgs.length==0)
            return false;
        return atgs[(int)(Math.random()*atgs.length)];
    }
}
